home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 10 / PC Guia 10.iso / database / shared.dir / 01011_Script_1011 < prev    next >
Text File  |  1996-03-14  |  3KB  |  115 lines

  1. on GetPeople
  2.   global mpath
  3.   
  4.   
  5.   
  6.   -- get the list of names that have ".TXT" 
  7.   set ftype = "txt"
  8.   
  9.   -- get the list of files in the current folder
  10.   put [] into fileList
  11.       repeat with i = 1 to the maxInteger
  12.             put getNthFileNameInFolder(mpath, i) ¼
  13.             into n
  14.             if n = EMPTY then exit repeat
  15.     set the itemdelimiter = "."
  16.     if item 2 of n = ftype then
  17.       if the number of chars of n > 4 or ¼
  18.             (the number of chars of n = 4 and char 1 to 2 of n <> "CU" ¼
  19.              and char 1 to 2 of n <> "SC") then
  20.                 append(fileList, item 1 of n)
  21.       end if
  22.     end if
  23.     set the itemdelimiter = ","
  24.       end repeat
  25.   
  26.   --    put fileList
  27.   
  28.   
  29.   
  30.   set num = count(filelist)
  31.   set txtfilelist = []
  32.   
  33.   -- put filenames in the makerfilename list
  34.   repeat with i = 1 to num
  35.     set tmp = getat(filelist,i)
  36.     
  37.     set tmpnum = bsearch(tmp,"MakerList")
  38.     if tmpnum > 0 then
  39.       put tmp into item 3 of line tmpnum of field "MakerFileNames"  
  40.     else
  41.       put "problem with: " && tmp
  42.     end if
  43.   end repeat
  44.   
  45.   if 1 then
  46.     set the text of field "Filenames" = " "
  47.     set the text of field "Filenames2" = " " 
  48.     if num > 25 then
  49.       repeat with i = 1 to 25
  50.         set tmp = getat(filelist,i)
  51.         
  52.         put item 1 of tmp into line (the number of lines of field "filenames") + 1 of¼
  53.  field "Filenames"  
  54.         
  55.         
  56.       end repeat
  57.       
  58.       repeat with i = 26 to num
  59.         set tmp = getat(filelist,i)
  60.         
  61.         put item 1 of tmp into line (the number of lines of field "filenames2") + 1 of¼
  62.  field "Filenames2"  
  63.         
  64.       end repeat
  65.     else
  66.       
  67.       repeat with i = 1 to num
  68.         set tmp = getat(filelist,i)
  69.         
  70.         put item 1 of tmp into line (the number of lines of field "filenames") + 1 of¼
  71.  field "Filenames"  
  72.         
  73.       end repeat
  74.     end if
  75.   end if
  76. end
  77.  
  78.  
  79. on DoIndex 
  80.   global mPath
  81.   
  82.   -- get the list of files in the current folder
  83.   put [] into fileList
  84.       repeat with i = 1 to the maxInteger
  85.             put getNthFileNameInFolder(mpath, i) ¼
  86.             into n
  87.             if n = EMPTY then exit repeat
  88.             append(fileList, n)
  89.       end repeat
  90.   
  91.   --    put fileList
  92.   
  93.   -- get the list of names that have ".TXT" 
  94.   
  95.   set num = count(filelist)
  96.   set txtfilelist = []
  97.   
  98.   repeat with i = 1 to num
  99.     set tmp = getat(filelist,i)
  100.     set the itemdelimiter = "."
  101.     if item 2 of tmp = "TXT" then
  102.       add(txtfilelist,tmp)  
  103.     end if
  104.     set the itemdelimiter = ","
  105.   end repeat
  106.   
  107.   put txtfilelist
  108.   
  109.   set num = count(txtfilelist)
  110.   repeat with i = 1 to num
  111.     makeindex (getat(txtfilelist,i))
  112.   end repeat
  113.   
  114. end
  115.